package com.mxpio.erp.common.inventory.entity;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.mxpio.erp.common.jpa.model.BizOrder;
import com.mxpioframework.security.annotation.Dict;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_INV_TO")
@Schema(description="调拨单")
public class TransferOrder extends BizOrder {

	private static final long serialVersionUID = 1L;
	
	@Column(name = "ORINGIN_WH_CODE_")
	@Schema(description = "调出仓库编号")
	@Dict(dicCode = "whCode" ,dicEntity = Warehouse.class, dicText = "whName")
	private String originWhCode;
	
	@Column(name = "WH_CODE_")
	@Schema(description = "调入仓库编号")
	@Dict(dicCode = "whCode" ,dicEntity = Warehouse.class, dicText = "whName")
	private String whCode;
	
	@Column(name = "MEMO_")
	@Schema(description = "备注")
	private String memo;

	@Override
	public String initTypeCode() {
		return "TO1";
	}
	
	@Transient
	private List<TransferOrderLine> transferOrderLines;
}
